<?php
	class nhanvien
	{
		var $hoten,$namsinh,$ngaycong;
		var $luongcb=1000000;
		var $thang_ht=1;
		var $nam_ht=2014;
		//$ngayCuaThang=cal_days_in_month(CAL_GREGORIAN, 1, 2014);
		function getHoten()
		{
			return $this->hoten;	
		}
		function setHoten($giatri)
		{
			$this->hoten=$giatri;
		}
		function getNamsinh()
		{
			return $this->namsinh;	
		}
		function setNamsinh($giatri)
		{
			$this->namsinh=$giatri;
		}
		function getNgaycong()
		{
			return $this->ngaycong;	
		}
		function setNgaycong($giatri)
		{
			$this->ngaycong=$giatri;
		}
		//Ham
		function TinhLuong()
		{
			return ($this->luongcb/31)*$this->ngaycong;
		}
	}
	class nhanvien_vp extends nhanvien
	{
		function TinhLuong()
		{
			return 4000000;	
		}
	}
	$vp=new nhanvien_vp();
	$vp->setNgaycong(28);
	$luong=$vp->TinhLuong();
	echo "$luong";
?>